import React from "react";
import '../style/components/procast-weather.scss'

const ProcastWeather = ({ weather, isLoading, isError }) => {
  return (
      <div className="procast">
           {(weather && weather.length ) && weather.map((day, index) => {
                return ( 
                    <div className="procast-item" key={index}>
                        <div className="procast-item-week">{day.currentWeek}</div>
                        <div className='procast-item-icon'>
                          <img className="procast-item-icon__img" src={day.weatherIcon}></img>
                        </div>
                        <div className="procast-item-temperature">
                            <div className="procast-item-temperature__val procast-item-temperature__val--max">{day.max}<span >&#8451; </span></div>
                            <div className="procast-item-temperature__val procast-item-temperature__val--min">{day.min}<span >&#8451; </span></div>
                        </div>
                    </div>)
            })}
      </div>
   
   
  );
};

export default ProcastWeather;
